package com.kfc.controller;

import com.kfc.entity.Teacher;
import com.kfc.service.TeacherService;
import lombok.Data;

// 服务员
@Data
public class TeacherController {
    // 从厨师那里得到菜品
    // 菜品的获取是依赖厨师
    private TeacherService teacherService;  // 接口

    // 服务员，可以接收顾客的点菜数据，id
    public Teacher orderTeacher(int id) {
        Teacher teacher = teacherService.getOneTeacherById(id);
        return teacher;
    }

    // id =1
    public String deleteById(int id) {
        Boolean rs = teacherService.deleteById(id);
        return rs ? "删除成功" : "删除失败";
    }


}
